﻿using System;

namespace ContainerVariations.Common
{
    public class Apple
    {
        private readonly IAppleContents _appleContents;

        public Apple(IAppleContents appleContents)
        {
            _appleContents = appleContents;
        }

        public override string ToString()
        {
            return "Apple contains: " + _appleContents;
        }
    }

    public interface IAppleContents
    {
        string ToString();
    }

    public class AppleSeeds : IAppleContents
    {
        public override string ToString()
        {
            return "Apple Seeds";
        }
    }

    public class Worm : IAppleContents
    {
        public override string ToString()
        {
            return "Worm";
        }
    }
}
